<?php
namespace app\admin\validate;

use think\Validate;

class Posts extends Validate {
    protected $rule =   [
        'title'  => 'require',
        'content'   => 'require',
        'category' => 'require',    
    ];
    
    protected $message  =   [
        'title.require' => '文章标题必填',
        'content.require'     => '文章内容必填',
        'category.require'   => '文章分类必选',
    ];
}